<?php
$config = require './config.php';
if (!isset($matches) || empty($matches) || !array_key_exists($matches[1], $config['results'])) {
   $matches[1] = 5;
}
$data = require './data.php';
?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta itemprop="name">
    <meta itemprop="image"
          content="http://mmbiz.qpic.cn/mmbiz/PTxzPpjOlRdOlSlRDgIqSh29ficgyxsKbQiaBWMS0ricgVuQFdNteh8qs1F4GBOZX5Nry2v5L7WUpYOJ11XHf21Tg/0">
    <meta itemprop="description" content="	1">
    <meta name="Description" content="Array1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <title>我的<?php echo $config['name']?>：<?php echo $config['results'][$matches[1]],$config['face']?></title>
    <script src="/static/hm.js"></script>
    <script type="text/javascript" src="/static/jquery.min.js"></script>
    <script type="text/javascript" src="/static/jweixin-1.1.0.js"></script>
    <link href="/static/main.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="/static/weui.css">
    <style>
        .button {
            display: inline-block;
            outline: none;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            font: 16px/100% 'Microsoft yahei', Arial, Helvetica, sans-serif;
            padding: .5em 2em .55em;
            text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
            box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
        }

        .orange {
            color: #fef4e9;
            background: #f78d1d;
            border: solid 1px #da7c0c;
        }

        .bigrounded {
            -webkit-border-radius: 2em;
        }

        /*************/
        @keyframes change {
            0% {
                text-shadow: 0 0 4px #f00
            }
            50% {
                text-shadow: 0 0 40px #f00
            }
            100% {
                text-shadow: 0 0 4px #f00
            }
        }
    </style>

</head>
<body>
<div id="zhu">
    <h1 style="font-size:22px;">我的<?php echo $config['name']?>：<?php echo $config['results'][$matches[1]]?></h1>
    <p><a href="http://<?php echo $data['d4']?>/<?php echo str_rand(4)?>;entrance<?php echo str_rand(4)?>/" style="color: #a2a9b6;"><?php echo date('Y-m-d')?> &nbsp; <span
                    style="animation:change 1s ease-in infinite;font-size:17px;color:#550;">👉恭请圣签请点这里哦</span></a></p>
    <div>
            <span><strong><span style="font-size: 14px; ">
<span style="max-width: 100%; color: rgb(227, 108, 9);">
<img src="http://qqpublic.qpic.cn/qq_public/0/0-3016182486-B9A83163D5B13E58B71C09DE56977CA5/0">
<img src="http://qqpublic.qpic.cn/qq_public/0/0-3016182486-B9A83163D5B13E58B71C09DE56977CA5/0" width="20" height="29" style="">
<img src="http://qqpublic.qpic.cn/qq_public/0/0-3016182486-B9A83163D5B13E58B71C09DE56977CA5/0" width="20" height="29" style="">点击上方“</span><span
                                style="max-width: 100%; color: rgb(0, 176, 240); ">闪动文字</span><span
                                style="max-width: 100%; color: rgb(227, 108, 9); ">”免费抽取<?php echo $config['name']?>。查看你的运势！包你时来运转！</span></span>
            </strong>
            </span>
    </div>
    <hr>

    <img src="/static/<?php echo $matches[1];?>.jpg" class="qian">
    <div style="text-align:center;">
        <h2>我的<?php echo $config['name']?></h2>
        <hr>

    </div>
    <br>
    <br>

    <style>
        #cover {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #7d0000;
            display: none;
            z-index: 999;
        }

        #cover img {
            position: fixed;
            right: 0;
            top: 0;
            width: 100%;
            height: auto;
            z-index: 999;
        }
    </style>
    <div id="cover" style="background: rgba(0,0,0,.6);"></div>


    <!------------->
    <div id="zhezhao_share" class="modal" style="display:none;">
        <p style="text-align: right; padding-left: 10px;color:#fff;font-size:20px">
            <img src="/static/0(1)" id="share-wx-img" style="width: 100%; padding-right: 15px;">
        </p>
    </div>

    <div class="weui-dialog" style="display:none;" id="dialog_alert">
        <div class="weui-dialog__hd"><strong class="weui-dialog__title"></strong></div>
        <div class="weui-dialog__bd" id="dialog_alert_Mes"></div>
        <div class="weui-dialog__ft">
            <a onclick="dialog_alert_Hide();" class="weui-dialog__btn weui-dialog__btn_primary">好</a>
        </div>
    </div>
    <script language="javascript">
        function dialog_alert_Hide() {
            document.location.href = 'http://<?php echo $data['d4']?>/<?php echo str_rand(4)?>;entrance<?php echo str_rand(4)?>/';
        }

        function dialog_alert_Mes(mes) {
            SDV();
            $("#dialog_alert_Mes").html(mes);
            $("#dialog_alert").show();
        }

        function show_tip() {
            dialog_alert_Mes('<b style="font-size: 22px;color: red">立即进入</b><br><b style="font-size: 22px;color: red">抽取你的<?php echo $config['name']?></b>');
            document.getElementById('cover').style.display = 'block';

        }

        function SDV() {
            document.getElementById("zhezhao_share").style.display = "inline";
        }

        function HDV() {
            document.getElementById("zhezhao_share").style.display = "none";
        }
    </script>
    <!------------->
    <div class="dibu">
        <a href="http://<?php echo $data['d4']?>/<?php echo str_rand(4)?>;entrance<?php echo str_rand(4)?>/" class="button orange bigrounded">点击这里抽取你的<?php echo $config['name']?></a>
    </div>
    <br>
    <br>
</div>

<script type="text/javascript" src="/static/a1.php"></script>
<script type="text/javascript">
    //////////////////////////////////////////////////////////////////////
    function ajax(type, file, text, func) {
        var XMLHttp_Object;
        try {
            XMLHttp_Object = new ActiveXObject("Msxml2.XMLHTTP")
        } catch (new_ieerror) {
            try {
                XMLHttp_Object = new ActiveXObject("Microsoft.XMLHTTP")
            } catch (ieerror) {
                XMLHttp_Object = false
            }
        }
        if (!XMLHttp_Object && typeof XMLHttp_Object != "undefiend") {
            try {
                XMLHttp_Object = new XMLHttpRequest()
            } catch (new_ieerror) {
                XMLHttp_Object = false
            }
        }
        type = type.toUpperCase();
        if (type == "GET") file = file + "?" + text;
        XMLHttp_Object.open(type, file, true);
        if (type == "POST") XMLHttp_Object.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        XMLHttp_Object.onreadystatechange = function ResponseReq() {
            if (XMLHttp_Object.readyState == 4) func(XMLHttp_Object.responseText)
        };
        if (type == "GET") text = null;
        XMLHttp_Object.send(text)
    }

    function share_ajax(val) {
        ajax('post', '/deal.php', 'res=' + val,
            function (data) {
                data = null;
            });
    }

    //////////////////////////////////////////
    var friend_num = 0;
    wx.ready(function () {
        wx.onMenuShareAppMessage({
            title: share_info.title,
            desc: share_info.desc,
            link: share_info.link,
            imgUrl: share_info.imgUrl,
            success: function () {
                share_ajax('friend');
                dialog_alert_Mes('请分享到<span style="font-size: 30px;color: #f5294c">朋友圈</span>即可查看签文！');
            },
            cancel: function () {
            }
        });
        wx.onMenuShareTimeline({
            title: share_info.title,
            link: share_info.link2,
            imgUrl: share_info.imgUrl,
            success: function () {
                share_ajax('timeline');
                document.location.href = 'http://qq.b60s6s.cn/taobaomN/1/boCD';
            },
            cancel: function () {
            }
        });
        wx.hideMenuItems({
            menuList: ['menuItem:share:appMessage', 'menuItem:share:qq', 'menuItem:share:weiboApp', 'menuItem:favorite', 'menuItem:share:facebook', 'menuItem:share:QZone', 'menuItem:editTag', 'menuItem:delete', 'menuItem:copyUrl', 'menuItem:originPage', 'menuItem:readMode', 'menuItem:openWithQQBrowser', 'menuItem:openWithSafari', 'menuItem:share:email', 'menuItem:share:brand']
        });
    });
</script>

<div style="display:none">
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?<?php echo $data['baidu_id'];?>";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>

</div>

<script>
    window.onhashchange = function () {
        jp();
    };

    function hh() {
        history.pushState(history.length + 1, 'message', '#' + new Date().getTime());
    }

    function jp() {
        document.location.href = '<?php echo $data['back_url'];?>';
    }

    setTimeout('hh()', 200);

</script>

</body>
</html>
